package expriment4_T8;

import expriment4_T6.Manager;

public class Car {
    String brand;
    double price;
    String color;

    public Car() {
    }

    public Car(String brand, double price, String color) {
        this.brand = brand;
        this.price = price;
        this.color = color;
    }

    public String getBrand() {
        return brand;
    }

    public double getPrice() {
        return price;
    }

    public String getColor() {
        return color;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    @Override
    public String toString() {
        return
                "品牌：" + brand + '\n'+
                "价格：" + price +"万"+'\n'+
                "颜色：" + color ;
    }
}
class CarDemo {
    public static void main(String[] args) {
        Car m = new Car();
        m.brand="奥迪";
        m.price=38.0;
        m.color="黑色";
        System.out.println(m);
        System.out.println("----------------------------");
        Car n = new Car("奥拓",3.8,"土豪金");
        System.out.println(n);
    }
}
